<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>javascript 阶段</title>
</head>
<body>
    <h3>循环语句 do ... while </h3>

    <script>
        // 定义计数器变量( i, j , num , index , count)
        var i = 1; 
        do {
            console.log("第"+i+"次循环");
            document.write("第"+i+"次循环"+"<br>");
            i ++;
        }while(i <= 5)


        var b = 0;
        do {
            console.log("第"+ b + "次进行循环");
            document.write("第" + b + "次进行循环" + "<br>");
            b++;
        }while(b<=5)

    </script>
</body>
</html>